import java.awt.*;
import java.security.PublicKey;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 杨已萱
 * Date: 2023-03-26
 * Time: 22:56
 */

    class Shape {
        public void draw(){
            System.out.println("画画!");
        }

    }
    class Rect extends Shape{
        @Override
        public void draw() {
            System.out.println("矩形!");
        }
        //        public void draw(){
//            System.out.println("矩形!");
//        }

    }
    class Cycle extends Shape{
        @Override
        public void draw() {
            System.out.println("圆形!");
        }
        //        public void draw(){
//            System.out.println("圆形!");
//        }
    }
public class Test2 {
        public static void huaHua(Shape shape){
            shape.draw();

        }
    public static void main(String[] args) {
            Rect rect = new Rect();
            Cycle cycle = new Cycle();
            huaHua(rect);
        huaHua(cycle);

    }


}
